﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using CI.Models.Data;

namespace XmlModelPackager
{
    class Program
    {
        static void Main(string[] args)
        {
            /*var modelList = new List<ModelDescription>
                                     {
                                         new ModelDescription()
                                             {
                                                 Name = "Production",
                                                 Notes = "Loads Item with child Blueprint, Materials and RAM",
                                                 RootElement = "Item",
                                                 RootElementID = "typeID",
                                                 Queries = QueryLoader.LoadQueries(new FileInfo("Queries\\Production.sql"))
                                             }
                                     };

            foreach(var model in modelList)
            {
                var gen = new XmlModelGenerator(model);

                var combinedOutput = gen.GenerateXml();

                combinedOutput.Save(model.Name + ".xml");    
            }*/

            

            log4net.Config.XmlConfigurator.Configure(new FileInfo("logging.log4net"));


            var genList = new List<IXmlGenerator>()
                              {
                                  new RegionsXmlGenerator(),
                                  new GraphcisXmlGenerator(),
                                  new ProductionXmlGenerator(), 
                                  new TypeCategoriesXmlGenerator()
                              };

            foreach(var gen in genList)
            {
                gen.GenerateXml();
                gen.WriteFile();
            }

        }

    }

}
